<template>
  <div class="headers">
    <div class="head-desc">
      <div class="head" v-lazy:background-image="bgImage"></div>
      <div class="desc">
        <div class="name-address">
          <p v-show="name" class="name">{{name}}</p>
          <p v-show="address" class="address">{{address}}</p>
        </div>
        <div class="tel-timer">
          <div style="display: inline-block">
            <span style="color: #666">电话:</span><a style="display: inline-block" v-show="tel" :href="'tel:'+tel" class="tel">{{tel}}</a>
          </div>
          <p v-show="timer" class="timer">{{timer*1000 | date()}}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['name', 'address', 'tel', 'timer', 'bgImage']
}
</script>

<style lang="scss" scoped>
  .headers{
    .head-desc{
      display: flex;
      margin: 0 10px;
      padding: 5px 0;
      border-bottom: 1px solid #f2f2f2;
      .head{
        flex: 0 0 50px;
        width: 50px;
        height: 50px;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 50%;
        margin-right: 10px;
      }
      .desc{
        flex: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .name-address{
          .name{
            margin-bottom: 13px;
            font-size: 15px;
          }
          .address{
            color: #666;
          }
        }
        .tel-timer{
          text-align: right;
          .tel{
            margin-bottom: 13px;
            display: block;
            font-style: italic;
            color: #0078de;
          }
          .timer{
            color: #999;
          }
        }
      }
    }
  }
</style>
